import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/navigation/home'
import blog from '@/components/navigation/blog'
import blogguanli from '@/components/navigation/blogguanli'
import denglu from '@/components/navigation/denglu'

Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'home',
      component: home
    },
    {
      path: '/blog/:index',
      name: 'blog',
      component: blog
    },
    {
      path: '/blogguanli/:index',
      name: 'blogguanli',
      component: blogguanli
    },
    ,
    {
      path: '/denglu',
      name: 'denglu',
      component: denglu
    }
  ]
})
